/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.qframe.quickc;

import java.util.List;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;

import javax.lang.model.element.TypeElement;
import org.qframe.quickc.annotations.QHandler;

@SupportedAnnotationTypes(value = {"*"})
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class TestAp extends AbstractProcessor {

    static {
        System.out.println(" TestAnnotationProcessor class loaded");
    }

    @Override
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
        System.out.println(" TestAnnotationProcessor in process1 " + annotations);
        System.out.println(" TestAnnotationProcessor in process 2" + roundEnv.getRootElements());
        System.out.println(" TestAnnotationProcessor in process 2" + roundEnv.getElementsAnnotatedWith(QHandler.class));

        for (TypeElement element : annotations) {
            System.out.println(element.getQualifiedName());


            List<? extends javax.lang.model.element.AnnotationMirror> annotationMirrors = element.getAnnotationMirrors();
            for (AnnotationMirror annotationMirror : annotationMirrors) {
               // System.out.println("annotationMirror : " + annotationMirror);

            }
        }
        return true;
    }
}
